﻿using System;
using System.IO;
using System.Net;
using System.Data;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using LKCMS.Common;

namespace LKCMS.Web.Admin.IM
{
    public partial class Add : LKCMS.Web.UI.ManagePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                chkLoginLevel("addIM");
            }
        }

        //保存
        protected void btnSave_Click(object sender, EventArgs e)
        {

            LKCMS.BLL.IM bll = new LKCMS.BLL.IM();
            LKCMS.Model.IM model = new LKCMS.Model.IM();
            //检查文件本地还是远程
            
            model.IMName = txtIMName.Text.Trim();
            model.IMAccount = txtIMAccount.Text.Trim();
            model.IMType=rblIMType.SelectedItem.Text;
            model.Islock = int.Parse(rblIsLock.SelectedItem.Value);
            model.SortId = int.Parse(this.txtSortId.Text.Trim());
            bll.Add(model);
            //保存日志
            SaveLogs("[IM模块]添加IM：" + model.IMName);

            JscriptPrint("增加IM成功啦！", "Add.aspx", "Success");
        }
    }
}
